<?php include_once './application/views/sys_admin/common/header.php';  ?>
<!-- admin_main -->
<div class="admin_main">
	<!-- Admin_top end -->
	<?php include_once './application/views/sys_admin/common/borrow_left.php';  ?>
	<!-- Admin_Left End -->
	<div class="admin_right">
		<div class="admin_right_title">
			<strong>贷款管理</strong> &gt;&gt;  债权转让复审
		</div>
		
		<div class="admin_borrow">
<form id="creditorForm" name="creditorForm">
<?php 
$statusArr = array(
	0=>'所有',
	1=>'未审核',
	2=>'审核通过',
	3=>'已完成',
	4=>'已取消',
);
?>
<input type="hidden" id="id" name="id" value="<?php echo $obj['id'];?>" />
		<div class="admin_right_info_title"><h2>债权转让复审</h2></div>
			<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#CCCCCC">
			  <tr>
				<td bgcolor="#FFFFFF">用户名：<?php echo $obj['username'];?></td>
				<td bgcolor="#FFFFFF">标题：<?php echo $obj['title'];?></td>
				<td bgcolor="#FFFFFF">待收总额：<font><?php echo number_format($obj['wait_account'],2);?></font></td>
			  </tr>
			  <tr>
				<td bgcolor="#FFFFFF">投资本金：<font><?php echo number_format($obj['account'],2);?></font></td>
				<td bgcolor="#FFFFFF">本金折让率：<font><?php echo $obj['discount_apr'];?>%</font></td>
				<td bgcolor="#FFFFFF">折后金额：<font><?php echo number_format($obj['discount_account'],2);?></font></td>
			  </tr>
			  <tr>
				<td bgcolor="#FFFFFF">申请时间：<?php echo date('Y-m-d H:i:s',$obj['add_time']);?></td>
				<td bgcolor="#FFFFFF">状态：<font>待复审</font></td>
				<td bgcolor="#FFFFFF">有效期：<?php echo $obj['valid_time'];?>天</td>
			  </tr>
			  <tr>
				<td colspan="3" bgcolor="#FFFFFF">转让说明：<br/>
				<?php echo nl2br($obj['content']);?>
				</td>
			  </tr>
			   <tr>
				<td colspan="3" bgcolor="#FFFFFF">申购明细：<br/>
					<table>
						<tr>
							<td>用户名</td>
							<td>申购金额</td>
							<td>申购时间</td>
							<td>状态</td>
						</tr>
						<?php 
						$logstatusArr = array(
							1=>'正在申购',
							2=>'申购完成',
							3=>'已还完',
							4=>'已取消',
						);
						?>
						<?php foreach ($buyers as $val){?>
						<tr>
							<td><?php echo $val['username'];?></td>
							<td><?php echo $val['discount_buy'];?></td>
							<td><?php echo date('Y-m-d',$val['add_time']);?></td>
							<td><?php echo $logstatusArr[$val['fstatus']];?></td>
						</tr>
						<?php }?>
						
					</table>

				</td>
			  </tr>
              <tr>
				<td colspan="3" bgcolor="#FFFFFF">状态：<input type="radio" name="fstatus" id="fstatus" value="3" checked="checked" />复审通过 <input type="radio" name="fstatus" id="fstatus" value="4" />复审不通过 </td>
			  </tr>
			</table>
<div style="overflow:hidden;width:99%;margin:10px 0;text-align:center;"><input type="button" onclick="creditor_submit();" value="提交" class="positive" />	</div>
</form>			
			</div>

<!-- Admin_Right End -->
</div>
<!-- admin_main end -->
<script type="text/javascript">
function creditor_submit(){
	var options = {
		url : '/sys_admin/creditor/doreverify.html',
		dataType: "text",
		type:"post",
		success : function(msg) {
			$('#dialog').dialog({
				modal:true,
				title:'系统提示',
				buttons:{"确定":function(){$(this).dialog("close");}},
				close: function() {
					location='/sys_admin/creditor/reverify_list';
				}
			});
			$("#msg").html(msg);
		}
	};
	$("#creditorForm").ajaxSubmit(options);
	return false;
}
</script>
<div id="dialog" title="系统提示" style="display:none"><p id="msg" style="text-align:center"></p></div>
</body>
</html>
